Telegram Group & Telegram Channel
#سوال

اینو حتماً شنیدید:
توی پایتون GIL باعث می‌شه multi-thread واقعی نداشته باشیم.

حالا من چندتا سوال سطح بالاتر می‌پرسم، می‌خوام این سوالا رو توی مصاحبه‌های سطح سنیور و مید استفاده کنم :


۱- مگر نه اینکه GIL باعث میشه در لحظه فقط یک thread توی پایتون اجرا بشه؟ پس چرا کتابخونه threading داریم ؟

۲- توی یک برنامه کاملاً پایتونی ( fortran, C, ... درگیر نباشه) بنظر شما کدوم مورد سریعتر هست و چرا ؟

threading یا asynchronous

۳- حالتی به ذهنت می‌رسه که توی یک کد کاملا پایتونی استفاده از threading بهتر از asynchronous باشه ؟


چرا این سوالات ؟ چون خسته شدم انقدر که سخت‌ترین سوال مصاحبه این بود که؛
کی از threading استفاده کنیم کی از multi-process ؟
گفتم چندتا سوال خوب برای مصاحبه طرح کنم، البته دارم روش کار می‌کنم.
۴-۵ تا دیگه اضافه می‌شه



tg-me.com/pyHints/782
Create:
Last Update:

#سوال

اینو حتماً شنیدید:
توی پایتون GIL باعث می‌شه multi-thread واقعی نداشته باشیم.

حالا من چندتا سوال سطح بالاتر می‌پرسم، می‌خوام این سوالا رو توی مصاحبه‌های سطح سنیور و مید استفاده کنم :


۱- مگر نه اینکه GIL باعث میشه در لحظه فقط یک thread توی پایتون اجرا بشه؟ پس چرا کتابخونه threading داریم ؟

۲- توی یک برنامه کاملاً پایتونی ( fortran, C, ... درگیر نباشه) بنظر شما کدوم مورد سریعتر هست و چرا ؟

threading یا asynchronous

۳- حالتی به ذهنت می‌رسه که توی یک کد کاملا پایتونی استفاده از threading بهتر از asynchronous باشه ؟


چرا این سوالات ؟ چون خسته شدم انقدر که سخت‌ترین سوال مصاحبه این بود که؛
کی از threading استفاده کنیم کی از multi-process ؟
گفتم چندتا سوال خوب برای مصاحبه طرح کنم، البته دارم روش کار می‌کنم.
۴-۵ تا دیگه اضافه می‌شه

BY Python Hints


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/pyHints/782

View MORE
Open in Telegram


Python Hints Telegram | DID YOU KNOW?

Date: |

What is Telegram?

Telegram is a cloud-based instant messaging service that has been making rounds as a popular option for those who wish to keep their messages secure. Telegram boasts a collection of different features, but it’s best known for its ability to secure messages and media by encrypting them during transit; this prevents third-parties from snooping on messages easily. Let’s take a look at what Telegram can do and why you might want to use it.

The seemingly negative pandemic effects and resource/product shortages are encouraging and allowing organizations to innovate and change.The news of cash-rich organizations getting ready for the post-Covid growth economy is a sign of more than capital spending plans. Cash provides a cushion for risk-taking and a tool for growth.

Python Hints from ye


Telegram Python Hints
FROM USA